package _2_函数_运算;

import org.junit.Test;

import java.math.BigDecimal;

/**
 * 四则运算
 */

public class _9_数学运算 {

    @Test
    public void test() {
        System.out.println(15 + 2.0);
        System.out.println(15 - 2.0);
        System.out.println(15 / 2.0);

        // int/int 得到 int
        System.out.println(15 / 2);
        System.out.println(15 % 2);

        System.out.println(20 / 10);
        System.out.println(23 / 10);
        System.out.println(23 % 10);
    }

    @Test
    public void 随机数字() {

    }

    @Test
    public void BigDe() {
        System.out.println(BigDecimal.ZERO.equals(new BigDecimal("0")));
        System.out.println(BigDecimal.ZERO.equals(new BigDecimal("0.00")));
    }
}
